<div class="menu-title text1 fs16">DANH MỤC SẢN PHẨM</div>
<div class="menuleft border-left text4 fs14">
	<?php 
		$items = array();
		foreach ($products as $product) {
				$sub = array();
				foreach ($product->children as $data):
					$url_child = $data->getUrl(array('id'=>$data->id));

					$sub[] = array(
							'label'=>CHtml::image('images/icon/li_child.png').$data->title, 
							'url'=>$url_child,
					);
				endforeach;
			$url = $product->getUrl(array('id'=>$product->id));
			// $active = Yii::app()->request->getParam('parent_id')===$product->id?'active':'';
			$items[] = array(
					'label'=>CHtml::image('images/icon/li.png').$product->title, 
					'url'=>$url,
					'items'=>$sub,
					'itemOptions'=>array('class'=>'li_text'),
			);
		}

	$this->widget('zii.widgets.CMenu',array(
		'id'=>'menu_left',
		'htmlOptions'=>array('class'=>'menu_left'),
		'items'=>$items,
		'encodeLabel'=>false,
		'submenuHtmlOptions'=>array('class'=>'child_left hide'),
		'firstItemCssClass'=>' mts',
		'lastItemCssClass'=>'last',
	)); ?>
</div>
<script type="text/javascript">
	$(document).ready(function(){
		$("ul#menu_left li").hover(
			function () {
			    $(this).addClass("hover");
			    $(this).find("ul.child_left").removeClass("hide");
			}, 
			function () {
			    $(this).removeClass("hover");
			    $(this).find("ul.child_left").addClass("hide");
			}
		);
	});
</script>